// https://umijs.org/config/
import { defineConfig } from 'umi';
import defaultSettings from './defaultSettings';
import tools from './tools-route'
import user from './user-route'
import menu from './menu-route'
import other from './other-route'
import home from './home-route'



const { REACT_APP_ENV } = process.env;

export default defineConfig({
  hash: true,
  antd: {

  },
  dva: {
    hmr: true,
  },
  locale: {
    // default zh-CN
    default: 'zh-CN',
    // default true, when it is true, will use `navigator.language` overwrite default
    antd: true,
    baseNavigator: true,
  },
  dynamicImport: {
    loading: '@/components/PageLoading/index',
  },
  targets: {
    ie: 11,
  },
  // umi routes: https://umijs.org/docs/routing
  routes: [
    {
      path: '/',
      component: '../layouts/BlankLayout',
      routes: [
        other,
        tools,
        user,
        home,
        menu,
      ],
    },

  ],
  // Theme for antd: https://ant.design/docs/react/customize-theme-cn
  theme: {
    // ...darkTheme,
    'primary-color': defaultSettings.primaryColor,
    'height-base': '28px',
    'height-lg': '32px',
    'height-sm': '24px',
    'padding-lg': '20px',
    'padding-md': '12px',
    'padding-sm': '8px',
    'padding-xs': '6px',
    'table-padding-vertical': '12px',
    'table-padding-horizontal': '12px',
    'font-size-base': '13px',
    'margin-lg': '20px',
    'margin-md': '12px',
    'margin-sm': '8px',
    'margin-xs': '6px',
    'margin-xss': '4px',
    'form-item-margin-bottom':'16px',
    'select-dropdown-height':'24px',
    'height-base':'24px',
    'input-height-base':'24px'
  },
  // @ts-ignore
  title: false,
  ignoreMomentLocale: true,
  manifest: {
    basePath: '/',
  },
});
